﻿// Shader-Based-Image-Processing (SBIP)
// http://code.google.com/p/sbip/
//
// Copyright © Frank Nagl, 2009-2011
// admin@franknagl.de
//
namespace SBIP.Helper.DataTypes
{
    using System.Drawing;

    /// <summary>
    /// Advancement of <see cref="Point"/> by a third 
    /// (Z-)component. 
    /// </summary>
    public struct Point3
    {
        /// <summary>X-component.</summary>
        public int X { get; set; }
        /// <summary>Y-component.</summary>
        public int Y { get; set; }
        /// <summary>Z-component.</summary>
        public int Z { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="Point3"/> struct.
        /// </summary>
        /// <param name="x">The x component.</param>
        /// <param name="y">The y component.</param>
        /// <param name="z">The z component.</param>
        public Point3(int x, int y, int z) : this()
        {
            X = x;
            Y = y;
            Z = z;
        }

        /// <summary>
        /// Returns the X- and Y-component as <see cref="Point"/>.
        /// </summary>
        /// <returns>The X- and Y-component as <see cref="Point"/>.</returns>
        public Point ToPoint()
        {
            return new Point(X, Y);
        }
    }
}
